// 版权归 瞄你个汪 所有。使用本代码应遵守相关法律法规和Apache 2.0开源许可要求。
package top.geeke.database.seed;

import top.geeke.constants.AppConstPool;
import top.geeke.entity.SysApp;
import top.geeke.toolkit.supertable.seed.SuperSeedData;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 系统应用表种子数据
 * </p>
 *
 * @author 瞄你个汪
 * @since 2024/5/26 8:13
 */
public class SysAppSeedData implements SuperSeedData<SysApp> {
    @Override
    public List<SysApp> getSeedData() {
        return new ArrayList<SysApp>(){{
            add(newInstance(AppConstPool.PRIMARY_ID, "默认应用", "SuperAdmin通用后台管理系统", "SuperAdmin", "SuperAdmin通用后台管理系统", "SuperAdmin", null, null, "SuperAdmin,Java,SpringBoot,MyBatisPlus,MySQL", null, "默认应用"));
        }};
    }

    public SysApp newInstance(Long id, String name, String zhAbbr, String enAbbr, String copyright, String orgInfo, String logo, String backgroundImage, String keyword, String desc, String remark) {
        SysApp app = new SysApp();

        app.setId(id);
        app.setAppName(name);
        app.setZhAbbr(zhAbbr);
        app.setEnAbbr(enAbbr);
        app.setLogo(logo);
        app.setDescription(desc);
        app.setRemark(remark);
        app.setOrgInfo(orgInfo);
        app.setKeyword(keyword);
        app.setCopyright(copyright);
        app.setBackgroundImage(backgroundImage);

        return app;
    }
}
